{% extends 'base.html' %}
{% block title %}
    重置密码
{% endblock %}
{% block css %}
{% endblock %}
{% block page-title %}
    重置密码
{% endblock %}
{% block page-content %}
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">重置<strong>{{ object.name }}</strong>密码</h3>
                </div>
                <div class="panel-body">
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-{{ message.tags }} alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                {{ message }}
                            </div>
                        {% endfor %}
                    {% endif %}
                    <form role="form" method="post" action="" class="form-horizontal">
                        {% csrf_token %}
                        <div class="form-group">
                            <label for="password" class="col-sm-2 control-label">密码：</label>
                            <div class="col-sm-10">
                              <input type="password" class="form-control" id="password" name="password"  autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group {% if form.errors.password2 %}has-error{% endif %}">
                            <label for="password2" class="col-sm-2 control-label">密码：</label>
                            <div class="col-sm-10">
                              <input type="password" class="form-control" id="password2" name="password2" autocomplete="off">
                                <span class="help help-block">{% if form.errors.password2 %}{% for error in form.errors.password2 %}{{ error }}{% endfor %}{% endif %}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" name='_save' class="btn btn-purple">重置密码</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block js %}

{% endblock %}